<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>给组件绑定原生事件</title>
    <script src="./vue.js"></script>
</head>
<body>
<div id="app">
    <!--为子组件绑定原生的点击事件-->
    <child @click.native="handleClick"></child>
</div>
<script>
    Vue.component('child', {
        template: '<div>Child</div>'
    });
    var app = new Vue({
        el: '#app',
        methods: {
            handleClick: function () {
                alert('click')
            }
        }
    });
</script>
</body>
</html>